package model

import "broker/interface/imodel"

/**
 * @Description
 * @Author huan.wang
 * @Date 2021/4/26 10:32 下午
 **/

type Subscriber struct {
	connID       uint32
	TopicFilters []imodel.ITopicFilter
}

func NewSubscriber(connID uint32, topicFilters []imodel.ITopicFilter) imodel.ISubscriber {
	return &Subscriber{connID: connID, TopicFilters: topicFilters}
}

func (s Subscriber) GetTopicFilters() []imodel.ITopicFilter {
	return s.TopicFilters
}

func (s Subscriber) GetConnID() uint32 {
	return s.connID
}
